<?php

namespace App\Admin\Controllers;

use App\Http\Controllers\Controller;
use Encore\Admin\Controllers\ModelForm;
use Encore\Admin\Facades\Admin;
use Encore\Admin\Layout\Content;
use Encore\Admin\Layout\Row;
use Encore\Admin\Widgets\Box;
use Encore\Admin\Widgets\InfoBox;
use Encore\Admin\Widgets\Table;
use Encore\Admin\Widgets\Tab;

class AnalysisController extends Controller
{
    use ModelForm;

    public function user()
    {
        return Admin::content(function (Content $content) {

            $content->header('微信公众号数据统计');
            //$content->description('');


            $tab = new Tab();


            $headers = ['Id', 'Email', 'Name', 'Company'];
            $rows = [
                [1, 'labore21@yahoo.com', 'Ms. Clotilde Gibson', 'Goodwin-Watsica'],
                [2, 'omnis.in@hotmail.com', 'Allie Kuhic', 'Murphy, Koepp and Morar'],
                [3, 'quia65@hotmail.com', 'Prof. Drew Heller', 'Kihn LLC'],
                [4, 'xet@yahoo.com', 'William Koss', 'Becker-Raynor'],
                [5, 'ipsa.aut@gmail.com', 'Ms. Antonietta Kozey Jr.'],
            ];

            $table = new Table($headers, $rows);


            $tab->add('累计用户', $table->render());
            $tab->add('新增人数', new Table());
            $tab->add('取消人数', 'blablablabla....');


            $content->row($tab->render());


        });
    }
}
